import request from '../../utils/request';
// 工人合同

// 查询工程签约的合同信息列表
export function QueryProjectSignContractInfoList(data) {
   let timestamp = new Date().getTime();
  return request({
    url: `/contract/api/contract/unconditional/queryWorkerContractProjectInfoList/v1?timestamp=${timestamp}`,
    method: 'post',
    data,
  })
}

// 查询头部信息数据（统计信息）
export function QueryProjectSignContractTotal(data) {
  let timestamp = new Date().getTime();
 return request({
   url: `/contract/api/contract/queryWorkerTopDataSourceTotal/v1?timestamp=${timestamp}`,
   method: 'post',
   data,
 })
}

// 查询工程签约的合同详细信息列表
export function QueryProjectSignContractDetailedInfoList(data) {
  let timestamp = new Date().getTime();
 return request({
   url: `/contract/api/contract/all/queryWorkerElectronicContractInfoList/v1?timestamp=${timestamp}`,
   method: 'post',
   data,
 })
}

// 驳回合同
export function CancelContract(data) {
  let timestamp = new Date().getTime();
 return request({
   url: `/contract/api/contract/rejectionElectronicContract/v1?timestamp=${timestamp}`,
   method: 'post',
   data,
 })
}

// 合同详情(不用json)
export function QueryContractFileDetails(data) {
  let timestamp = new Date().getTime();
 return request({
   url: `/contract/api/contract/all/queryContractDetail/v1?timestamp=${timestamp}`,
   method: 'post',
   data
 })
}

// 签署合同
export function signElectronicContract(data) {
  let timestamp = new Date().getTime();
 return request({
   url: `/contract/api/contract/all/signElectronicContract/v1?timestamp=${timestamp}`,
   method: 'post',
   data
 })
}

// 签署多份合同
export function signMultipleElectronicContract(data) {
    let timestamp = new Date().getTime();
    return request({
        url: `/contract/api/contract/all/signElectronicContracts/v1?timestamp=${timestamp}`,
        method: 'post',
        data
    })
}

// 发起签署之前的手机验证
export function getVerCodeV1(params) {
  return request({
    // url: `http://slbapp.gongyoumishu.com:80/gomeet/webapi/common/phone/sendSMS/v1`,
    url: `http://slbtest.gongyoumishu.com:80/gomeet/webapi/common/phone/sendSMS/v1`,
    method: 'get',
    params
  })
 }

 // 发起签署之前的手机验证码验证
export function vaildSMS(data) {
  return request({
    // url: `http://slbapp.gongyoumishu.com:80/gomeet/webapi/common/phone/vaildSMS/v1?phone=${data.phone}&code=${data.code}`,
    url: `http://slbtest.gongyoumishu.com:80/gomeet/webapi/common/phone/vaildSMS/v1?phone=${data.phone}&code=${data.code}`,
    method: 'post'
  })
 }

 // 查看工人列表
 export function QueryGroupWorkerList(data) {
  let timestamp = new Date().getTime();
  return request({
    url: `/contract/api/contract/all/queryWorkerContractWorkerList/v1?timestamp=${timestamp}`,
    method: 'post',
    data
 })
}

// 已签订合同 --> 合同列表
export function QuerySigningPartyContractList(data) {
  let timestamp = new Date().getTime()
  return request({
    url: `/contract/api/contract/all/queryWorkerElectronicContractInfoList/v1?timestamp=${timestamp}`,
    method: 'post',
    data
  })
}
// 查询工人项目合同数量
export function queryWorkerTopDataSourceTotal(data) {
  let timestamp = new Date().getTime()
  return request({
    url: `/contract/api/contract/queryWorkerTopDataSourceTotal/v1?timestamp=${timestamp}`,
    method: 'post',
    data
  })
}

